var $tbody = $('ul.hauto');
var $info_tmpl = $('#info_tmpl');
$(function () {
    getInsuranceInfo();

    var time = setInterval(function() {
        getInsuranceInfo();
    }, 5 * 60 * 1000);

    var hours = setInterval(function() {
        window.location.reload();
    }, 60 * 60 * 1000);
});


function getInsuranceInfo(){
    $.ajax({
        url: '/hospital/zzyjsView/today',
        data:"",
        type: 'get',
        dataType: 'json',
        contentType: 'application/json;charset=utf-8',
        cache: false,
        success: function(data) {
            var list = data.result.records;
            console.log(list);
            var html = "";
            html = $info_tmpl.render(list);
            $tbody.html(html);

        },
        error: function(xhr) {
        }
    });
}






